home *** CD-ROM | disk | FTP | other *** search
/ CD World Haziran 1997 / CD World Haziran 1997.iso / Explorer Yardimcilari / PiXCL Tools / Ptdk95a.px_ / Ptdk95a.px
Encoding:
PiXCL source  |  1996-08-06  |  32.0 KB  |  1,080 lines

  1. {    Filename    : PTDK95a.pxl
  2.      Purpose    : PDK Interface
  3.     Date        : 21 sep 94
  4.     Author    : S.Dibbs, VYSOR Integration Inc
  5. History:
  6.  
  7.     Update    :  v4.0 RELEASE
  8.     Purpose    :  Rebuild with PiXCL 4.0 95 and NT
  9.     Date        :  06 aug 96
  10. -------------------------------------------------------------------------}
  11. Initialize: {only one instance allowed}
  12.     InfoMenu(REMOVE)
  13.     SetMenu("Initializing ...",IGNORE,ENDPOPUP)
  14.     UseCoordinates(PIXEL)
  15.     UseFont("Arial",5,15,NOBOLD,NOITALIC,NOUNDERLINE,0,0,255)
  16.     GetScreenCaps(HORZRES, X_res)
  17.     GetScreenCaps(VERTRES, Y_res)
  18.     GetScreenCaps(NUMCOLORS, Z_res)
  19.     SetColorPalette(BITMAP)
  20.     ClipBoardEmpty
  21.  
  22.     WinGetActive(OldCaption$)
  23.     Set Title$ = "PiXCL Tools Developer's Kit v4.0"
  24.     WinExist(Title$,Res)
  25.     If Res = 0 Then Goto One_Instance
  26.         Beep 
  27.         WaitInput(150) Beep WaitInput(150) Beep 
  28.         WinSetActive(Title$,Res)
  29.         WinShow(Title$,RESTORE,Res)
  30.         End
  31.     {endif}
  32. One_Instance:
  33.     WinTitle(OldCaption$,Title$)
  34.     Script_File$ = ""
  35.     NotePadEdit$ = ""
  36.     WriteEdit$ = ""
  37.     DirGet(SourceDir$)
  38.     DirGetWindows(WindowsDir$)
  39.     DirGetSystem(WindowsSysDir$)
  40.     INI_File$ = SourceDir$ + "\pdktools.ini"
  41.     ResizeFlag = 0
  42.     HelpFile$ = SourceDir$ + "\pixclhlp.hlp"
  43.  
  44.     FileRead_INI(INI_File$,"Statusbar","Visible",StatusVis$)
  45.     If StatusVis$ = "Y" 
  46.         StatusWindow(ENABLE,BOTTOM,3,350,500,-1,0)
  47.         StatusFlag = 1
  48.     Else
  49.         StatusFlag = 0 
  50.     Endif
  51.     GoSub FrameLocate
  52.     
  53.     WinShow(Title$,NOTOPMOST,Res)
  54.     UseBackground(TRANSPARENT,255,255,255) {white}
  55.     UsePen(SOLID,2,0,0,0)
  56.     UseBrush(NULL,0,0,0)
  57.     DrawBackGround
  58.  
  59.     
  60.     WaitInput(100)
  61.     DirGet(CurrentDir$)
  62.  
  63.     GoSub DrawBanner
  64.  
  65.     WaitInput(100)
  66.     DrawBackGround
  67.  
  68.     FileRead_INI(INI_File$,"Toolbar","Visible",ToolVis$)
  69.     If ToolVis$ = "Y" 
  70.         GoSub DrawToolBar
  71.         ToolFlag = 1
  72.     Else
  73.         ToolFlag = 0
  74.     Endif
  75.  
  76.  
  77. Command_Level:
  78.     GoSub Get_FFD_Flag {returns FFD$}
  79.     GoSub Get_DevelDir
  80.  
  81.     GoSub Get_Last_Edit
  82.  
  83. Command_Level_1:     {tool buttons are 64 x 64 pixels}
  84.     If ToolFlag = 1 Then GoSub MouseButtons
  85.     If ToolFlag = 1 Then GoSub MouseHints
  86.  
  87.     SetKeyBoard(112,Toolbox_help)
  88.  
  89. Wait_for_Input:
  90.         WaitInput(100)
  91.         SetMenu("&File Operations",IGNORE,
  92.         Last_Edit$, Edit_Last,
  93.         SEPARATOR,
  94.         "&NotePad Edit Source",NotePad_Edit,
  95.         "&Write Edit Source",Write_Edit,
  96.         SEPARATOR,
  97.         "&Acquire/Edit Icon",IconManager,
  98.         "Edit &PaintBrush Image",PaintBrush,
  99.         "Paint&ShopPro",PaintShopPro,
  100.         SEPARATOR,
  101.         "&Rename File",Rename_Files,
  102.         "Cop&y File",Copy_Files,
  103.         "&Delete File",Delete_Files,
  104.         SEPARATOR,
  105.         "&File Manager",File_Manager,
  106.         SEPARATOR,
  107.         "Delete File &Check",Preferences,
  108.         "Set &Working Directory",WorkingDir,
  109.         SEPARATOR,
  110.         "E&xit!",Leave,
  111.         ENDPOPUP,
  112.         "&View",IGNORE,
  113.         "&Toolbar",ViewToolbar,
  114.         "&StatusBar",ViewStatusBar,
  115.         ENDPOPUP,
  116.         "&Test PiXCL Script", PiXCL,
  117.         ENDPOPUP,
  118.         "&Make PiXCL Runtime",PXL_make,
  119.         ENDPOPUP,
  120.         "&User #2",UserApp_2,
  121.         ENDPOPUP,
  122.         "&Help",IGNORE,
  123.         {"&Windevel Help...F2",WDV_Help,}
  124.         "&PiXCL Cmd Reference...F1",Toolbox_Help,
  125.         SEPARATOR,
  126.         "&About",About,
  127.         SEPARATOR,
  128.         "Show Active Editors",Show_Active,
  129.         SEPARATOR,
  130.         "Toggle TopMost",ToggleTopmost,
  131.         ENDPOPUP)
  132.         
  133.     If ToolFlag = 0 Then ChangeMenuItem("&Toolbar",UNCHECK,Res)
  134.     If ToolFlag = 1 Then ChangeMenuItem("&Toolbar",CHECK,Res)
  135.     If StatusFlag = 0 Then ChangeMenuItem("&StatusBar",UNCHECK,Res)
  136.     If StatusFlag = 1 Then ChangeMenuItem("&StatusBar",CHECK,Res)
  137.  
  138.     If Last_Edit$ = "No Last Edit available" Then ChangeMenuItem(Last_Edit$,GRAY,Res)
  139.     If Last_Edit$ = "" Then ChangeMenuItem(Last_Edit$,GRAY,Res)
  140.         
  141.     If FFD$ = "Y" Then ChangeMenuItem("Delete File &Check",CHECK,Res)
  142.     If FFD$ = "N" Then ChangeMenuItem("Delete File &Check",UNCHECK,Res)
  143.  
  144.     WinExist("PiXCL Help v4.0",Rsl)
  145.     If Rsl = 1 
  146.         WinShow("PiXCL Help v4.0",TOPMOST,Res)
  147.     Else
  148.         {If NotePadEdit$ <> "" Then WinShow(NotePadEdit$,TOPMOST,Res)
  149.         If WriteEdit$ <> "" Then WinShow(WriteEdit$,TOPMOST,Res)
  150.         If PaintBrushEdit$ <> "" Then WinShow(PaintBrushEdit$,TOPMOST,Res)
  151.         If PSPEdit$ <> "" Then WinShow(PSPEdit$,TOPMOST,Res)
  152.         }
  153.     Endif
  154. Wait_for_Input4:
  155.     GoSub UpdateFrameLocate
  156.     WaitInput()
  157.  
  158. ToggleTopmost:
  159.     WinShow(Title$,BOTTOM,Res)
  160.     Goto Wait_for_Input
  161.  
  162. ViewToolbar:
  163.     If ToolFlag = 1
  164.           DrawBackGround
  165.         SetMouse()
  166.         SetRightMouse()
  167.         ToolFlag = 0
  168.         ToolVis$ = "N"
  169.         FileWrite_INI(INI_File$,"Toolbar","Visible",ToolVis$,Res)
  170.     Else
  171.           GoSub DrawToolbar
  172.         GoSub MouseButtons
  173.         GoSub MouseHints
  174.         ToolFlag = 1
  175.         ToolVis$ = "Y"
  176.         FileWrite_INI(INI_File$,"Toolbar","Visible",ToolVis$,Res)
  177.     Endif
  178.     Goto Wait_for_Input
  179.  
  180.  
  181. ViewStatusBar:
  182.     If StatusFlag = 1
  183.           StatusWindow(DISABLE,BOTTOM,0,0,0,0,0)
  184.         StatusFlag = 0
  185.         StatusVis$ = "N"
  186.         FileWrite_INI(INI_File$,"Statusbar","Visible",StatusVis$,Res)
  187.     Else
  188.           StatusWindow(ENABLE,BOTTOM,3,200,300,-1,0)
  189.         StatusFlag = 1
  190.         StatusVis$ = "Y"
  191.         FileWrite_INI(INI_File$,"Statusbar","Visible",StatusVis$,Res)
  192.     Endif
  193.     Goto Wait_for_Input
  194.  
  195. {======================================================================}
  196. Leave: {shutdown all the processes}
  197.     If NotePadEdit$ = "" Then WinClose(NotePadEdit$,Res)
  198. Leave_1:
  199.     If WriteEdit$ = "" Then WinClose(WriteEdit$,Res)
  200. Leave_2:
  201.     If PaintBrushEdit$ = "" Then WinClose(PaintBrushEdit$,Res)
  202. Leave_3:
  203.     If PSPEdit$ = "" Then WinClose(PSPEdit$,Res)
  204. Leave_4:
  205.     WinExist("Windevel Visual Shell",Res)
  206.     If Res = 0 Then WinClose("Windevel Visual Shell",Res)
  207. Leave_5:
  208.     WinExist("PiXCL Help v4.0",Res)
  209.     If Res = 0 Then WinClose("PiXCL Help v4.0",Res)
  210. Leave_6:
  211.     FreeVarAll
  212.     FreeBitMapAll
  213.     End
  214. {======================================================================}
  215. Edit_Last: {try to edit the last PXL file accessed. Command Line should be valid}
  216.     Set  Edit_BLCx = X_Res  - 50      Set Edit_BLCy= Y_Res - 60
  217.     If Error = 0 then Goto Edit_Last_1
  218.     Set CommandLine$ = Last_Edit$
  219.     Left(CommandLine$,5,Temp$)
  220.     Run(CommandLine$)
  221.     Gosub Get_Edit_Window
  222.     
  223. Edit_Last_1:
  224.     Goto Wait_for_Input
  225.  
  226. {======================================================================}
  227. About:
  228.     AboutUser("PiXCL Tools v4.0",
  229.     "Developer Shell",
  230. "Windows 95 and NT application written and copyright 
  231. ⌐ (1994-96) by VYSOR Integration Inc, Gatineau, Quebec.
  232. All Rights Reserved.")
  233.  
  234.     Goto Wait_for_Input
  235.  
  236.  
  237. {=====================================================================}
  238. Toolbox_help:
  239.     GoSub FlipHelpBtn
  240.     
  241.     WinExist("PiXCL Help v4.0",Res)
  242.     If Res = 0 Then WinHelp(HelpFile$,CONTENTS,"")     
  243. Toolbox_help_1:
  244.     WinShow("PiXCL Help v4.0",TOPMOST,Res)
  245.     WinGetLocation(Title$,VDK_x1,VDK_y1,VDK_x2,VDK_y2,Res)
  246.     If Res = 1 Then SetCtrlMouse(VDK_x1,VDK_y1,VDK_x2,VDK_y2,Help_to_TOP,X,Y)
  247. Toolbox_help_OK:
  248.     Goto Wait_for_Input
  249.  
  250. Help_to_TOP:
  251.     WinShow("PiXCL Help v4.0",TOPMOST,Res)
  252.     Goto Wait_for_Input
  253.  
  254.  
  255. WDV_Help:
  256.     
  257.     WinExist("Windevel Visual Shell",Res)
  258.     If Res = 1 Then Goto WDV_Help_1
  259.         CommandLine$ = "winhlp32.exe  "
  260.         CommandLine$ = CommandLine$ + SourceDir$
  261.         CommandLine$ = CommandLine$ + "\windevel.hlp"
  262.         Run(CommandLine$)
  263.         Goto WDV_Help_OK
  264.     {endif}
  265. WDV_Help_1:
  266.     WinSetActive("Windevel Visual Shell",Res)
  267. WDV_Help_OK:
  268.     Goto Wait_for_Input
  269.  
  270.  
  271. {=====================================================================}
  272. File_Manager:
  273.     GoSub FlipFileManBtn
  274.     CommandLine$ = "WINFILE.EXE"
  275.     Run(CommandLine$)
  276.     WinGetActive(FileManager$)
  277.  
  278.     Goto Wait_for_Input
  279.  
  280.  
  281.  
  282. {=====================================================================}
  283. NotePad_Edit:
  284.     GoSub FlipNotepadBtn
  285.     Set Filter$ = "Files(*.pxl;*.txt),*.pxl;*.txt"
  286.     Set InitFile$ = "*.pxl"
  287.     Set Label$ = "Select the PiXCL script file to edit with NotePad"
  288.  
  289. NotePad_Edit_1:
  290.     Set InitDir$ = CurrentDir$
  291.     FileGet(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR_EXIST,Script_File$)
  292.     DirGet(CurrentDir$)
  293.     If Script_File$ = "" Then Goto Wait_for_Input {CANCEL chosen}
  294.     If Script_File$ = "*.pxl" Then Goto Wait_for_Input {CANCEL chosen}
  295.     Set CommandLine$ = "Notepad.exe  "
  296.     Set CommandLine$ = CommandLine$ + Script_File$
  297.     Set Last_Edit$ = CommandLine$
  298.       Gosub Update_INI_File
  299.     ChangeMenuItem(Last_Edit$,ENABLE,Res)
  300.     Set CommandLine$ = Last_Edit$
  301.     FileName(Script_File$,Script$,Res)
  302.     FileExtension(Script_File$,Ext$,Res)  Ext$ = "." + Ext$ 
  303.     NotePadEdit$ = Script$ + Ext$ 
  304.     NotePadEdit$ = NotePadEdit$ + " - Notepad"
  305.     Run(CommandLine$)
  306.     
  307.     WinExist(NotePadEdit$,Res)
  308.     While Res = 0
  309.         WinExist(NotePadEdit$,Res)
  310.         WaitInput(1)
  311.     EndWhile
  312.     
  313.     WinShow(NotePadEdit$,TOPMOST,Res)
  314.  
  315.  
  316.     Set  Edit_BLCx = X_Res - 50      Set Edit_BLCy = Y_Res - 60
  317.     WinLocate(NotePadEdit$,135,126,Edit_BLCx ,Edit_BLCy,Res)
  318.     
  319.     If Filter$ = "Files(*.inf),*.inf" Then Set Script_File$ = ""
  320.     DrawStatusWinText(0,Script_File$)
  321.     Goto Wait_for_Input
  322.  
  323. {======================================================================}
  324. Write_Edit:
  325.     GoSub FlipWordPadBtn
  326.  
  327.     Set Filter$ = "Files(*.pxl;*.txt),*.pxl;*.txt"
  328.     Set InitFile$ = "*.pxl"
  329.     Set InitDir$ = CurrentDir$
  330.     Set Label$ = "Select the PiXCL script file to edit with Write"
  331.     FileGet(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR_EXIST,Script_File$)
  332.     DirGet(CurrentDir$)
  333.     If Script_File$ = "" Then Goto Wait_for_Input {CANCEL chosen}
  334.     If Script_File$ = "*.pxl" Then Goto Wait_for_Input {CANCEL chosen}
  335.  
  336.     Set CommandLine$ = "write.exe  "
  337.     Set CommandLine$ = CommandLine$ + Script_File$
  338.     Set Last_Edit$ = CommandLine$
  339.     Gosub Update_INI_File
  340.     ChangeMenuItem(Last_Edit$,ENABLE,Res)
  341.     Set CommandLine$ = Last_Edit$
  342.  
  343.     FileName(Script_File$,Script$,Res)
  344.     FileExtension(Script_File$,Ext$,Res)  Ext$ = "." + Ext$
  345.     WriteEdit$ = Script$ + Ext$
  346.     WriteEdit$ = WriteEdit$ + " - WordPad"
  347.     Run(CommandLine$)
  348.     
  349.     WinExist(WriteEdit$,Res)
  350.     While Res = 0
  351.             WinExist(WriteEdit$,Res)
  352.         WaitInput(1)
  353.     EndWhile
  354.     
  355.     WinShow(WriteEdit$,TOPMOST,Res)
  356.  
  357. Write_Edit_2:
  358.     Set  Edit_BLCx = X_Res    - 50      Set Edit_BLCy= Y_Res - 60
  359.     WinLocate(WriteEdit$,135,126,Edit_BLCx ,Edit_BLCy,Res)
  360.     DrawStatusWinText(0,Script_File$)
  361.     Goto Wait_for_Input
  362.  
  363. Show_Active: {display the active editors}
  364.     Label$ = "Active text or image editors"
  365.     If NotePadEdit$ <> "" 
  366.         WinExist(NotePadEdit$,Res)
  367.         If Res = 0
  368.          NotePadEdit$ = ""
  369.         Else
  370.         List$ = NotePadEdit$ + "|"
  371.         Endif
  372.     Endif
  373.     If WriteEdit$ <> ""
  374.         WinExist(WriteEdit$,Res)
  375.         If Res = 0
  376.         WriteEdit$ = ""
  377.         Else
  378.         List$ = List$ + WriteEdit$
  379.         List$ = List$ + "|"
  380.         Endif
  381.     Endif
  382.     If PaintbrushEdit$ <> "" 
  383.         WinExist(PaintbrushEdit$,Res)
  384.         If Res = 0
  385.         PaintbrushEdit$ = ""
  386.         Else
  387.         List$ = List$ + PaintbrushEdit$
  388.         List$ = List$ + "|"
  389.         Endif
  390.     Endif
  391.     If PSPEdit$ <> "" 
  392.         WinExist(PSPEdit$,Res)
  393.         If Res = 0
  394.         PSPEdit$ = ""
  395.         Else
  396.         List$ = List$ + PSPEdit$
  397.         Endif
  398.     Endif
  399.  
  400.     Delimiter$ = "|"
  401.     ListBox(Label$, List$, Delimiter$, Res$)
  402.     Goto Wait_for_input
  403.  
  404. {========================================================================}
  405. PaintBrush:
  406.     GoSub FlipPaintBtn
  407.  
  408.     Set Filter$ = "Files(*.bmp;*.rle),*.bmp;*.rle"
  409.     Set InitFile$ = "*.bmp"
  410.     Set InitDir$ = CurrentDir$
  411.     Set Label$ = "Select the image file to edit with PaintBrush"
  412.     FileGet(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR_EXIST,Image_File$)
  413.     DirGet(CurrentDir$)
  414.     If Image_File$ = "" Then Goto Wait_for_Input {CANCEL chosen}
  415.     If Image_File$ = InitFile$ Then Goto Wait_for_Input {CANCEL chosen}
  416.  
  417.     WinShow(Title$,NOTOPMOST,Res)
  418.  
  419.     Set CommandLine$ = "pbrush.exe  "
  420.     Set CommandLine$ = CommandLine$ + Image_File$
  421.     FileName(Image_File$,Image$,Res)
  422.     FileExtension(Image_File$,Ext$,Res) Ext$ = "." + Ext$
  423.     PaintBrushEdit$ = Image$ + Ext$ 
  424.     PaintBrushEdit$ = PaintBrushEdit$ + " - Paint"
  425.     Run(CommandLine$)
  426.     WinExist(PaintBrushEdit$,Res)
  427.     While Res = 0
  428.         WinExist(PaintBrushEdit$,Res)
  429.         WaitInput(1)
  430.     EndWhile
  431.     WinShow(PaintBrushEdit$,TOPMOST,Res)
  432.     DrawStatusWinText(0,Image_File$)
  433.     Goto Wait_for_Input
  434.  
  435. {========================================================================
  436.  Adapt this code for a user defined application. JASC Paint Shop Pro is 
  437.  the sample application here. It should be either inthe PiXCL application
  438.  directory or in the PATH environment string. }
  439. PaintShopPro:
  440.     GoSub FlipUser_1_Btn
  441.     Set Filter$ = "Files(*.bmp;*.rle),*.bmp;*.rle"
  442.     Set InitFile$ = "*.bmp"
  443.     Set InitDir$ = CurrentDir$
  444.     Set Label$ = "Select the image file to edit with PaintShopPro"
  445.     FileGet(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR_EXIST,Image_File$)
  446.     DirGet(CurrentDir$)
  447.     If Image_File$ = "" Then Goto Wait_for_Input {CANCEL chosen}
  448.     If Image_File$ = InitFile$ Then Goto Wait_for_Input {CANCEL chosen}
  449.  
  450.     Set CommandLine$ = "psp.exe " 
  451.     EXE_File$ = CommandLine$  Trim(EXE_File$)
  452.     FileExist(EXE_File$,Res)
  453.     If Res = 1
  454.         CommandLine$ = CommandLine$ + Image_File$
  455.         Run(CommandLine$)
  456.         WinGetActive(PSPEdit$)
  457.         DrawStatusWinText(0,Image_File$)
  458.     Else
  459.         MessageBox(OK,1,EXCLAMATION,
  460. "WARNING: The above file cannot be found in the 
  461. installation directory or in the current PATH. 
  462. Please correct or re-install the missing file.",
  463.         EXE_File$,Res)
  464.     Endif
  465.     Goto Wait_for_Input
  466.  
  467. {=====================================================================
  468.  Adapt this code for a user defined application. IconManager is 
  469.  the sample application here. It should be either inthe PiXCL application
  470.  directory or in the PATH environment string. }
  471.  
  472. IconManager: 
  473.     GoSub FlipIconBtn
  474.  
  475.     CommandLine$ = SourceDir$ + "\iconmn32.exe"
  476.  
  477.     Set EXE_File$ = CommandLine$  
  478.     FileExist(EXE_File$,Res)
  479.     If Res = 0
  480.         MessageBox(OK,1,EXCLAMATION,
  481. "WARNING: The above file cannot be found in the 
  482. installation directory or in the current PATH. 
  483. Please correct or re-install the missing file.",
  484.         EXE_File$,Res)
  485.     Else
  486.         Run(CommandLine$)
  487.     Endif
  488.  
  489.     Goto Wait_for_Input
  490.  
  491. {======================================================================}
  492.  
  493. Preferences:
  494. { Update a file on the disk so that the FAST FILE delete provides an 
  495. optional  check before deleting. The Default is No Check as defined in 
  496. the VDKTOOLS.INI file. Options are "Y" or "N". Update the string and write
  497. the .INI file as needed.}
  498.  
  499.     GetMenuStatus("Delete File &Check",CHECKED,Res)
  500.     If Res = 0 Then Goto NoCheckPref 
  501.         FileWrite_INI(INI_File$,"PiXCL_Developer's_Kit","FastFileDel","N",Res)
  502.         ChangeMenuItem("Delete File &Check",UNCHECK,Res)
  503.             Goto Prefs_Done
  504. NoCheckPref: {else}
  505.         FileWrite_INI(INI_File$,"PiXCL_Developer's_Kit","FastFileDel","Y",Res)
  506.         ChangeMenuItem("Delete File &Check",CHECK,Res)
  507.     {endif}
  508. Prefs_Done:
  509.     Goto Wait_for_Input
  510.  
  511. {======================================================================}
  512. WorkingDir: {Update the .INI file with the latest working directory.}
  513.     Set Text$ = "Enter the new working directory:"
  514.     Set Label$ = "Change the Development Directory"
  515.     Set WorkingDir$ = DevelDir$
  516.     TextBox(Text$, Label$,WorkingDir$, Btn)
  517.     If WorkingDir$ = "" Then Goto Wait_for_Input
  518.     If Btn = 2 Then Goto Wait_for_Input {CANCEL pressed} 
  519.     DirChange(WorkingDir$,Res)
  520.     If Res = 1 Then Goto WorkingDir1
  521.         MessageBox(OK,1,STOP,"Specified Directory does not exist.",
  522.         "WARNING: incorrect selection",Res)
  523.         Goto Wait_for_Input
  524.     {endif}
  525. WorkingDir1:
  526.     DirChange(SourceDir$,Res) {keep source dir current.}
  527.     Set DevelDir$ = WorkingDir$
  528.     Set CurrentDir$ = WorkingDir$
  529.     GoSub Update_INI_File
  530.     Goto Wait_for_Input
  531.  
  532. {======================================================================}
  533. PiXCL:
  534.     GoSub FlipTestScript
  535.  
  536.     Set CommandLine$ = SourceDir$ + "\PiXCL40.exe  "
  537.     Set EXE_File$ = CommandLine$   Trim(EXE_File$)
  538.     If Script_File$ <> ""
  539.         Set CommandLine$ = CommandLine$ + Script_File$
  540.         Set Script_File$ = ""
  541.     Endif
  542.  
  543. PiXCL_OK:
  544.     FileExist(EXE_File$,Res)
  545.     If Res = 0
  546.         MessageBox(OK,1,STOP,
  547. "WARNING: The above file cannot be found in the 
  548. installation directory. Please correct or 
  549. re-install the missing file.",
  550.         EXE_File$,Res)
  551.     Else
  552.           Run(CommandLine$)
  553.     Endif
  554.  
  555.     Goto Wait_for_Input
  556.  
  557. {======================================================================}
  558. PXL_make:
  559.     GoSub FlipMakeScript
  560.  
  561.     Set CommandLine$ = SourceDir$ + "\PXL_make.exe"
  562.     Set EXE_File$ = CommandLine$
  563.     FileExist(EXE_File$,Res)
  564.     If Res = 0 
  565.         MessageBox(OK,1,STOP,
  566. "WARNING: The above file cannot be found in the 
  567. installation directory. Please correct or 
  568. re-install the missing file.",
  569.         EXE_File$,Res)
  570.     Else
  571.         Run(CommandLine$)
  572.     Endif
  573.  
  574.     Goto Wait_for_Input
  575.  
  576. {======================================================================
  577.  Adapt this code for a user defined application. userapp2.exe is 
  578.  the sample application here. It should be either in the PiXCL application
  579.  directory or in the PATH environment string. }
  580.  
  581. UserApp_2:
  582.     GoSub FlipUser_2_Btn
  583.     DirChange(SourceDir$, Res)
  584.     Set CommandLine$ = SourceDir$ + "\userapp2.exe"
  585.     Set EXE_File$ = CommandLine$
  586.     FileExist(EXE_File$,Res)
  587.     If Res = 0
  588.         MessageBox(OK,1,STOP,
  589. "WARNING: The above file cannot be found in the 
  590. installation directory or in the current PATH. 
  591. Please correct or re-install the missing file.",
  592.         EXE_File$,Res)
  593.     Else
  594.         Run(CommandLine$)
  595.     Endif 
  596.  
  597.     Goto Wait_for_Input
  598.  
  599. {======================================================================}
  600. Copy_Files:
  601. { Provide a method to copy files without using the FileManager }
  602.  
  603.  {Get the input file name with FileGet(...) }
  604.  
  605.     Set FF_file$ = ""
  606.     Set Filter$ =  "All Files(*.*),*.*"
  607.     Set InitDir$ = CurrentDir$
  608.     Set InitFile$ = ""
  609.     FileGet(Filter$, InitFile$, InitDir$,"Select the file to be copied",
  610.         CHANGEDIR_EXIST, FF_file$)
  611.     If FF_file$ = "" Then FreeVar(Filter$) | Goto Wait_for_Input   {CANCEL button pressed}
  612.     DirGet(CurrentDir$)
  613.  
  614. { Display a TextBox, display the current name, get the new name (OK), or CANCEL }
  615.  
  616. Copy_Files_1:
  617.     Set NewName$ = FF_file$
  618.     TextBox("Enter the new filename, then press OK.
  619. Press Cancel to abort the copy process.","Copy a file",NewName$, Btn)
  620.  
  621.     If Btn = 2 Then Goto Wait_for_input    {CANCEL pressed}
  622.     If FF_File$ <> NewName$ Then Goto Copy_Proceed
  623.         MessageBox(OK,1,EXCLAMATION,"You cannot copy a file to itself.",
  624.            "Output file naming error",Res)
  625.         Goto Copy_Files
  626.     {endif}
  627.  
  628. Copy_Proceed: {check if the target file exists.}
  629.     FileExist(NewName$,Res)
  630.     If Res = 0 Then Goto Copy_Proceed_1
  631.         Set Label$ = NewName$ + " already exists"
  632.         MessageBox(OKCANCEL,1,QUESTION,
  633.         "Click OK to overwrite, CANCEL to respecify",Label$,Res)
  634.         If Res = 2 Then Goto Copy_Files_1
  635.     {endif}
  636.  
  637. Copy_Proceed_1: { issue the FileCopy command. }
  638.     FileCopy(FF_file$, NewName$,Res)
  639.     If Res = 1 Then Goto Copy_OK_1
  640.         MessageBox(OK,1,EXCLAMATION,
  641.         "Please take the necessary steps to fix the problem.",
  642.         "Error copying to the target file",Res)
  643.     {endif}
  644.     DrawBackGround
  645.     GoSub DrawToolbar
  646.  
  647.     Goto Wait_for_input
  648.  
  649.  
  650. Copy_OK_1:
  651.     Set Msg$ = "File         " + FF_file$
  652.     UseFont("Arial",9,21,NOBOLD,ITALIC,NOUNDERLINE,0,255,0)
  653.     Drawtext(140,78,Msg$)
  654.     Set Msg$ = "copied to " + NewName$
  655.     Drawtext(140,102,Msg$)
  656.     WaitInput(2000)
  657.     DrawBackGround
  658.     UseFont("Arial",6,15,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  659.     GoSub DrawToolbar
  660.  
  661.     Goto Wait_for_input
  662.  
  663.  
  664. {======================================================================}
  665. Rename_Files:
  666.  
  667.  {Get the input file name with FileGet(...) }
  668.  
  669.     Set FF_file$ = ""    {create a null variable}
  670.     Set Filter$ = "All Files(*.*),*.*"
  671.     DirGet(InitDir$)
  672.     Set InitFile$ = " "
  673.     FileGet(Filter$,InitFile$, InitDir$,"Select the file to be renamed",
  674.         CHANGEDIR_EXIST, FF_file$)
  675.     If FF_file$ = "" Then Goto Wait_for_Input   {CANCEL button pressed}
  676.  
  677. { Display a TextBox, display the current name, get the new name (OK), or CANCEL }
  678.  
  679.     Set NewName$ = FF_file$
  680.     TextBox("Enter the new filename, then press OK.
  681. Press Cancel to leave the name unchanged.","Rename a file",NewName$, Btn)
  682.  
  683.     If Btn = 2 Then Goto Wait_for_input    {CANCEL pressed}
  684.  
  685. { issue the FileRename command. }
  686.  
  687.     Set Msg$ = "Renaming " + FF_file$
  688.     UseFont("Arial",11,10,NOBOLD,ITALIC,NOUNDERLINE,0,255,0)
  689.     Drawtext(140,78,Msg$)
  690.     Set Msg$ = "to             "  + NewName$
  691.     Drawtext(140,94,Msg$)
  692.  
  693.     FileRename(FF_file$, NewName$,Res)
  694.     If Res = 1 Then Goto Rename_OK
  695.         DrawBackGround
  696.         MessageBox(OK,1,EXCLAMATION,
  697.         "Please take the necessary steps to fix the problem.",
  698.         "Error renaming the target file",Res)
  699.     {endif}
  700.  
  701. Rename_OK:
  702.     DrawBackGround
  703.     UseFont("Arial",6,15,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  704.     GoSub DrawToolBar
  705.     Goto Wait_for_input
  706.  
  707. {======================================================================}
  708. Delete_Files:
  709. { Provide a fast file delete option, with NO double check for safety, unless the Preference is
  710. enabled }
  711.  
  712.  {Get the input file name with FileGet(...) }
  713.  
  714.     Set NCLabel$ = "FAST FILE DELETE:  be very careful ... no safety check !!!"
  715.     Set CLabel$ = "FAST FILE DELETE:  safety check enabled !!!"
  716.  
  717.     Set FF_file$ = ""    {create a null variable}
  718.     Set Filter$ = "All Files(*.*),*.*"
  719.     DirGet(InitDir$)
  720.     Set InitFile$ = " "
  721.     GetMenuStatus("Delete File &Check",CHECKED,Res)
  722.     If Res = 0 Then FileGet(Filter$,InitFile$, InitDir$, NCLabel$, CHANGEDIR_EXIST, FF_file$)
  723.     If Res = 1 Then FileGet(Filter$,InitFile$, InitDir$, CLabel$, CHANGEDIR_EXIST, FF_file$)
  724.  
  725.     If FF_file$ = "" Then Goto Wait_for_Input   {CANCEL button pressed}
  726.  
  727. { Display a TextBox, display the current name, get the new name (OK), or CANCEL }
  728.  
  729.     If Res = 0 Then Goto Delete_Files_OK1
  730.         MessageBox(OKCANCEL,1,QUESTION, "Are you sure", "File Delete Check",Res)
  731.         If Res = 2 Then Goto Wait_for_Input
  732.         { else continue}
  733.     {endif}
  734.  
  735. Delete_Files_OK1:
  736. { issue the FileDelete command. }
  737.     FileDelete(FF_file$,Res)
  738.     If Res = 1 Then Goto Delete_Files_OK2
  739.         MessageBox(OK,1,EXCLAMATION,
  740.         "Please take the necessary steps to fix the problem.",
  741.         "Error deleting the target file(s)",Res)
  742.         Goto Wait_for_input
  743.     {endif}
  744.  
  745. Delete_Files_OK2:
  746.     Set Msg$ = FF_file$ + " deleted !"
  747.     UseFont("Arial",13,21,NOBOLD,ITALIC,NOUNDERLINE,255,0,0)
  748.     Drawtext(140,78,Msg$)
  749.     WaitInput(3000)
  750.     DrawBackGround
  751.     UseFont("Arial",6,15,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  752.     GoSub DrawToolBar
  753.     Goto Wait_for_input
  754.  
  755. {======================================================================}
  756. DrawBanner: {Subroutine}
  757.     AboutUser("PiXCL Tools v4.0",
  758.     "PiXCL Script Developer Shell",
  759. "Windows 95 and NT application written and copyright 
  760. ⌐ (1994-96) by VYSOR Integration Inc, Gatineau, Quebec.
  761. All Rights Reserved.")
  762.     Return
  763.  
  764. {======================================================================}
  765. DrawToolbar: {Subroutine}
  766.     UsePen(SOLID,1,0,0,0)
  767.     UseBrush(SOLID,192,192,192)
  768.     WinGetClientRect(Title$,cx1,cy1,cx2,cy2)
  769.  
  770.     DrawRectangle(-1,-1,cx2,51)
  771.  
  772.     DrawEdgeRectangle(  2, 2, 65,49,RAISEDEDGE,ADJUST,RECT)
  773.     DrawIcon(18,9,0,0,ICON11) {notepad}
  774.  
  775.     DrawEdgeRectangle( 66, 2,129,49,RAISEDEDGE,ADJUST,RECT)
  776.     DrawIcon(82,9,0,0,ICON09) {wordpad}
  777.  
  778.     DrawEdgeRectangle(130, 2,193,49,RAISEDEDGE,ADJUST,RECT)
  779.     DrawIcon(146,9,0,0,ICON13) {paintbrush}
  780.  
  781.  
  782.     DrawEdgeRectangle(194, 2,259,49,RAISEDEDGE,ADJUST,RECT)
  783.     DrawStatusText(196, 4,257,47,"  User",NOBORDER) {user#1: psp}
  784.  
  785.     DrawEdgeRectangle(260, 2,323,49,RAISEDEDGE,ADJUST,RECT)
  786.     DrawIcon(276,9,0,0,ICON15) {icon}
  787.  
  788.     DrawEdgeRectangle(324, 2,389,49,RAISEDEDGE,ADJUST,RECT)
  789.     DrawIcon(340,9,0,0,ICON01) {test}
  790.  
  791.     DrawEdgeRectangle(390, 2,453,49,RAISEDEDGE,ADJUST,RECT)
  792.     DrawIcon(406,9,0,0,ICON05) {make}
  793.  
  794.     DrawEdgeRectangle(454, 2,519,49,RAISEDEDGE,ADJUST,RECT)
  795.     DrawStatusText(456, 4,517,47,"  User",NOBORDER) {user#2: ???}
  796.  
  797.     DrawEdgeRectangle(520, 2,583,49,RAISEDEDGE,ADJUST,RECT) 
  798.     DrawIcon(536,9,0,0,ICON12) {help}
  799.  
  800.     DrawEdgeRectangle(590, 2,655,49,RAISEDEDGE,ADJUST,RECT)
  801.     DrawIcon(606,9,0,0,ICON07) {filemanager}
  802.  
  803.     DrawEdgeRectangle(665,2,730,49,RAISEDEDGE,ADJUST,RECT)
  804.     DrawIcon(681,9,0,0,QUESTION) {context help}
  805.  
  806.     Return
  807. {=======================================================================}
  808. FlipNotePadBtn:
  809.     DrawEdgeRectangle(  2, 2, 65,49,SUNKENEDGE,ADJUST,RECT)
  810.     DrawIcon(19,10,0,0,ICON11)
  811.     WaitInput(Button_Pause)
  812.     DrawEdgeRectangle(  2, 2, 65,49,RAISEDEDGE,ADJUST,RECT)
  813.     DrawIcon(18,9,0,0,ICON11)
  814.     Return
  815.  
  816. FlipWordPadBtn:
  817.     DrawEdgeRectangle( 66, 2,129,49,SUNKENEDGE,ADJUST,RECT)
  818.     DrawIcon(83,10,0,0,ICON09)
  819.     WaitInput(Button_Pause)
  820.     DrawEdgeRectangle( 66, 2,129,49,RAISEDEDGE,ADJUST,RECT)
  821.     DrawIcon(82,9,0,0,ICON09)
  822.     Return
  823.  
  824. FlipPaintBtn:
  825.     DrawEdgeRectangle(130, 2,193,49,SUNKENEDGE,ADJUST,RECT)
  826.     DrawIcon(147,10,0,0,ICON13)
  827.     WaitInput(Button_Pause)
  828.     DrawEdgeRectangle(130, 2,193,49,RAISEDEDGE,ADJUST,RECT)
  829.     DrawIcon(146,9,0,0,ICON13)
  830.     Return
  831.  
  832. FlipUser_1_Btn:
  833.     DrawEdgeRectangle(194, 2,259,49,SUNKENEDGE,ADJUST,RECT)
  834.     DrawStatusText(197, 5,257,47,"  User",NOBORDER) {user#1: psp}
  835.     WaitInput(Button_Pause)
  836.     DrawEdgeRectangle(194, 2,259,49,RAISEDEDGE,ADJUST,RECT)
  837.     DrawStatusText(196, 4,257,47,"  User",NOBORDER) {user#1: psp}
  838.     Return
  839.  
  840. FlipIconBtn:
  841.     DrawEdgeRectangle(260, 2,323,49,RAISEDEDGE,ADJUST,RECT)
  842.     DrawIcon(277,10,0,0,ICON15)
  843.     WaitInput(Button_Pause)
  844.     DrawEdgeRectangle(260, 2,323,49,RAISEDEDGE,ADJUST,RECT)
  845.     DrawIcon(276,9,0,0,ICON15)
  846.     Return
  847.  
  848. FlipTestScript:
  849.     DrawEdgeRectangle(324, 2,389,49,SUNKENEDGE,ADJUST,RECT)
  850.     DrawIcon(341,10,0,0,ICON01)
  851.     WaitInput(Button_Pause)
  852.     DrawEdgeRectangle(324, 2,389,49,RAISEDEDGE,ADJUST,RECT)
  853.     DrawIcon(340,9,0,0,ICON01)
  854.     Return
  855.  
  856. FlipMakeScript:
  857.     DrawEdgeRectangle(390, 2,453,49,SUNKENEDGE,ADJUST,RECT)
  858.     DrawIcon(407,10,0,0,ICON05)
  859.     WaitInput(Button_Pause)
  860.     DrawEdgeRectangle(390, 2,453,49,RAISEDEDGE,ADJUST,RECT)
  861.     DrawIcon(406,9,0,0,ICON05)
  862.     Return
  863.  
  864. FlipUser_2_Btn:
  865.     DrawEdgeRectangle(454, 2,519,49,SUNKENEDGE,ADJUST,RECT)
  866.     DrawStatusText(197, 5,257,47,"  User",NOBORDER) {user#1: psp}
  867.     WaitInput(Button_Pause)
  868.     DrawEdgeRectangle(454, 2,519,49,RAISEDEDGE,ADJUST,RECT)
  869.     DrawStatusText(196, 4,257,47,"  User",NOBORDER) {user#1: psp}
  870.     Return
  871.  
  872.  
  873. FlipHelpBtn: {subroutine}
  874.     DrawEdgeRectangle(520, 2,583,49,SUNKENEDGE,ADJUST,RECT)
  875.     DrawIcon(537,10,0,0,ICON12)    
  876.     WaitInput(Button_Pause)
  877.     DrawEdgeRectangle(520, 2,583,49,RAISEDEDGE,ADJUST,RECT)
  878.     DrawIcon(536,9,0,0,ICON12)
  879.     Return    
  880. FlipFileManBtn:
  881.     DrawEdgeRectangle(590, 2,655,49,SUNKENEDGE,ADJUST,RECT)
  882.     DrawIcon(607,10,0,0,ICON07)
  883.     WaitInput(Button_Pause)
  884.     DrawEdgeRectangle(590, 2,655,49,RAISEDEDGE,ADJUST,RECT)
  885.     DrawIcon(606,9,0,0,ICON07)
  886.     Return
  887. FlipContextBtn:
  888.     DrawEdgeRectangle(665,2,730,49,SUNKENEDGE,ADJUST,RECT)
  889.     DrawIcon(682,10,0,0,QUESTION)
  890.     WaitInput(Button_Pause)
  891.     DrawEdgeRectangle(665,2,730,49,RAISEDEDGE,ADJUST,RECT)
  892.     DrawIcon(681,9,0,0,QUESTION)
  893.     Return
  894.  
  895.  
  896. {======================================================================}
  897. Get_FFD_Flag: {subroutine}
  898.     FileRead_INI(INI_File$,"PiXCL_Developer's_Kit","FastFileDel",FFD$)
  899.     FileRead_INI(INI_File$,"PiXCL_Developer's_Kit","ButtonPause", BP$)
  900.  
  901.     Val(BP$,Button_Pause,Res)
  902.     If Res = 0
  903.         MessageBox(OK,1,EXCLAMATION,"ButtonPause value invalid or missing: setting default value !",
  904.         "Incorrect INI file entry",Res)
  905.            FileWrite_INI(INI_File$,"PiXCL_Developer's_Kit","ButtonPause","200",Res)
  906.         Button_Pause = 200
  907.     Endif
  908.     Return
  909.  
  910. {======================================================================}
  911. Get_DevelDir: {subroutine}
  912.     FileRead_INI(INI_File$,"PiXCL_Developer's_Kit",
  913.              "DevelDir",DevelDir$)
  914.     If DevelDir$ = "" Then DevelDir$ = SourceDir$
  915.     CurrentDir$ = DevelDir$
  916.     Return
  917.  
  918. {======================================================================}
  919. Update_INI_File: {subroutine: update the .INI file with the new working dir}
  920.     FileWrite_INI(INI_File$,"PiXCL_Developer's_Kit",
  921.              "DevelDir",DevelDir$,Res)
  922.     FileWrite_INI(INI_File$,"PiXCL_Developer's_Kit",
  923.              "LastEdit",Last_Edit$,Res)
  924.     
  925.     If Res = 1 Then Return
  926.         MessageBox(OK,1,EXCLAMATION,"Unable to update pdktools.ini",
  927.         "WARNING: Unexpected action failure.",Res)
  928.     Error = 0
  929.     Return
  930. {=======Subroutine=======================================================}
  931. Get_Edit_Window:
  932.     If Temp$ = "write" Then Goto Get_Edit_Window1
  933.         WinGetActive(NotePadEdit$)
  934.         WinLocate(NotePadEdit$,135,126,Edit_BLCx,Edit_BLCy,Res)
  935.         Set Error = 1
  936.         Goto Get_Edit_Done
  937.          {endif}
  938. Get_Edit_Window1:
  939.     SetWaitMode(NULL)
  940.     WinGetActive(WriteEdit$)
  941.     WaitInput(1)
  942. Get_Edit_Window1a:   {for}
  943.     If WriteEdit$ <> "Write" then Goto Get_Edit_Window2
  944.         WaitInput(100)
  945.         WinGetActive(WriteEdit$)
  946.         Goto Get_Edit_Window1a 
  947.     {end for}
  948. Get_Edit_Window2:
  949.     WinLocate(WriteEdit$,135,126,Edit_BLCx ,Edit_BLCy,Res)
  950. Get_Edit_Done:
  951.     Return
  952. {======================================================================}
  953. Get_Last_Edit:
  954.     Set Last_Edit$ = "No Last Edit available"
  955.     FileRead_INI(INI_File$,"PiXCL_Developer's_Kit","LastEdit",Last_Edit$)
  956.     If Last_Edit$ = "No String" 
  957.         Last_Edit$ = "No Last Edit available" 
  958.         Error = 0     
  959.          Return 
  960.     Endif
  961.     Error = 1
  962.     CommandLine$ = Last_Edit$
  963.  
  964.     Return
  965. {======================================================================}
  966. FrameLocate:
  967.     FileRead_INI(INI_File$,"Frame","Left",Left$)     Val(Left$,wx1,Res)
  968.     FileRead_INI(INI_File$,"Frame","Top",Top$)    Val(Top$,wy1,Res)    
  969.     FileRead_INI(INI_File$,"Frame","Right",Right$)    Val(Right$,wx2,Res)
  970.     FileRead_INI(INI_File$,"Frame","Bottom",Bottom$) Val(Bottom$,wy2,Res)
  971.         
  972.     WinLocate(Title$,wx1,wy1,wx2,wy2,Res)
  973.     wxx1 = wx1    wyy1 = wy1   wxx2 = wx2    wyy2 = wy2
  974.     Return
  975.  
  976. UpdateFrameLocate:
  977.     WinGetLocation(Title$,wx1,wy1,wx2,wy2,Res)
  978.     If wx1 <> wxx1 Then ResizeFlag = 1
  979.     If wx2 <> wxx2 Then ResizeFlag = 1
  980.     If wy1 <> wyy1 Then ResizeFlag = 1
  981.     If wy2 <> wyy2 Then ResizeFlag = 1
  982.     If ResizeFlag = 1
  983.         Str(wx1,Left$) Str(wy1,Top$) Str(wx2,Right$) Str(wy2,Bottom$)
  984.         FileWrite_INI(INI_File$,"Frame","Left",Left$,Res) Val(Left$,wx1,Res)
  985.         FileWrite_INI(INI_File$,"Frame","Top",Top$,Res)    Val(Top$,wy1,Res)    
  986.         FileWrite_INI(INI_File$,"Frame","Right",Right$,Res) Val(Right$,wx2,Res)
  987.         FileWrite_INI(INI_File$,"Frame","Bottom",Bottom$,Res) Val(Bottom$,wy2,Res)
  988.         wxx1 = wx1    wyy1 = wy1   wxx2 = wx2    wyy2 = wy2
  989.         ResizeFlag = 0
  990.         GoSub DrawToolbar
  991.     Endif
  992.     Return
  993. {===========================================================================}
  994. MouseButtons:
  995.     SetMouse(  2,2, 65,49,NotePad_Edit,X,Y,
  996.           66,2,129,49,Write_Edit,X,Y,
  997.          130,2,193,49,PaintBrush,X,Y,
  998.              194,2,257,49,PaintShopPro,X,Y,
  999.          258,2,321,49,IconManager,X,Y,
  1000.          322,2,385,49,PiXCL,X,Y,
  1001.          386,2,449,49,PXL_make,X,Y,
  1002.          450,2,513,49,UserApp_2,X,Y,
  1003.          514,2,577,49,Toolbox_Help,X,Y,
  1004.          590,2,653,49,File_Manager,X,Y,
  1005.          1,50,X_res,Y_res,Wait_for_input,X,Y)
  1006.     Return
  1007.  
  1008. MouseHints:
  1009.     SetRightMouse(  2,2, 65,49,NotePad_Edit_ID,hX,hY,
  1010.               66,2,129,49,Write_Edit_ID,hX,hY,
  1011.              130,2,193,49,PaintBrush_ID,hX,hY,
  1012.                  194,2,257,49,PaintShopPro_ID,hX,hY,
  1013.              258,2,321,49,IconManager_ID,hX,hY,
  1014.              322,2,385,49,PiXCL_ID,hX,hY,
  1015.              386,2,449,49,PXL_make_ID,hX,hY,
  1016.              450,2,513,49,UserApp2_ID,hX,hY,
  1017.              514,2,577,49,Toolbox_Help_ID,hX,hY,
  1018.              590,2,653,49,File_Manager_ID,hX,hY,
  1019.  
  1020.             665,2,730,49,Context_Help,X,Y)
  1021.     Return    
  1022.  
  1023. NotePad_Edit_ID:
  1024.     Msg$ = "MS NotePad"    Goto ShowHint
  1025. Write_Edit_ID:
  1026.     Msg$ = "MS WordPad"  Goto ShowHint
  1027. PaintBrush_ID:
  1028.     Msg$ = "MS Paint"    Goto ShowHint
  1029. PaintShopPro_ID:
  1030.     Msg$ = "User Defined"  Goto ShowHint
  1031. IconManager_ID:
  1032.     Msg$ = "Icon Tool" Goto ShowHint
  1033. PiXCL_ID:
  1034.     Msg$ = "Test Script" Goto ShowHint
  1035. PXL_make_ID:
  1036.     Msg$ = "Make EXE" Goto ShowHint
  1037. UserApp2_ID:
  1038.     Msg$ = "User defined" Goto ShowHint
  1039. Toolbox_Help_ID:
  1040.     Msg$ = "PiXCL Help" Goto ShowHint
  1041. File_Manager_ID:
  1042.     Msg$ = "FileManager"
  1043. ShowHint:
  1044.     SetMouse()
  1045.     hX2 = hX + 90   hY = 60 hY2= 78
  1046.     hX3 = hX + 5    hY3 = 61
  1047.     UseBrush(SOLID,255,255,255)
  1048.     UsePen(SOLID,1,255,255,255)
  1049.     DrawRectangle(wx1,hY,wx2,hY2)
  1050.     UseFont("Arial",6,15,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  1051.     UseBrush(SOLID,255,255,128)
  1052.     UsePen(SOLID,1,0,0,0)
  1053.     DrawRectangle(hX,hY,hX2,hY2)
  1054.     DrawText(hX3,hY3,Msg$)
  1055.     WaitInput(1200)
  1056.     UseBrush(SOLID,255,255,255)
  1057.     UsePen(SOLID,1,255,255,255)
  1058.     DrawRectangle(wx1,hY,wx2,hY2)
  1059.     GoSub MouseButtons
  1060.  
  1061.     Goto Wait_for_Input
  1062.  
  1063. Context_Help: {PiXCL Command context help}
  1064.     GoSub FlipContextBtn
  1065.     ClipBoardGet(PiXCLcmd$,Res) 
  1066.     NoCmd = 1
  1067.     If PiXCLcmd$ = ""
  1068.         MessageBox(OK,1,INFORMATION,
  1069. "To get context sensitive Help, select the command
  1070. in the current editor (e.g. NotePad or WordPad), 
  1071. Ctrl-C to copy to the clipboard, then using the 
  1072. Right mouse, click the Question icon on the toolbar.",
  1073.         "Getting Context Sensitive Help",Res)
  1074.         NoCmd = 0
  1075.     Endif
  1076.     If NoCmd = 0 Then Goto Wait_for_Input
  1077. Context_Help_1: { construct the help command}
  1078.     WinHelp(HelpFile$,KEY,PiXCLcmd$)
  1079.     Goto Wait_for_Input
  1080.